import {defineStore} from "pinia";
import settings from '../../settings.ts'

const {layoutType} = settings

export const useSettingStore = defineStore("setting",{
    state: ()=> {
        return {
            layoutType,
            sidebar: {
                open: true
            }
        }
    },
    actions: {
        changeLayoutType(type:string) {
            this.layoutType = type
        },
        changeSidebar() {
            this.sidebar.open = !this.sidebar.open
        }
    }
})
